<template>
	<div class="cardform" >
<el-form ref="form" :model="form" label-width="120px" label-position="top">
    <el-form-item label="DepartmentNotice Title" label-width=200px >
      <el-input v-model="form.name" placeholder="Please input the title"></el-input>
    </el-form-item>
    <el-form-item label="DepartmentNotice Content" label-width=200px>
      <el-input v-model="form.desc" type="textarea" :rows="6" placeholder="Please input the content"></el-input>
    </el-form-item>
	<el-form-item>
<el-upload
    class="upload-demo"
    drag
    action="https://jsonplaceholder.typicode.com/posts/"
    multiple
  >
    <el-icon class="el-icon--upload"><upload-filled /></el-icon>
    <div class="el-upload__text">
      Drop file here or <em>click to upload</em>
    </div>
    <template #tip>
      <div class="el-upload__tip">
        jpg/png files with a size less than 500kb
      </div>
    </template>
  </el-upload>
	</el-form-item>
    <el-form-item>
      <el-button type="info" @click="onSubmit">Submit</el-button>
    </el-form-item>
  </el-form>
  </div>
</template> 

<script>
import { ElMessage } from 'element-plus'
export default {
  data() {
    return {
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
      },
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!')
ElMessage({
        message: 'Submited Successfully!',
        type: 'success',
		center:true,
      })
    },
  },
}
</script>

<style scoped>
	.cardform{
		border: 1px dotted lightgray;
		border-radius: 8px;
	}
</style>
